An Aggressive Approach to Loop Unrolling
نویسندگان
چکیده
A well-known code transformation for improving the execution performance of a program is loop unrolling. The most obvious benefit of unrolling a loop is that the transformed loop usually, but not always, requires fewer instruction executions than the original loop. The reduction in instruction executions comes from two sources: the number of branch instructions executed is reduced, and the index variable is modified fewer times. In addition, for architectures with features designed to exploit instruction-level parallelism, loop unrolling can expose greater levels of instructionlevel parallelism. Loop unrolling is an effective code transformation often improving the execution performance of programs that spend much of their execution time in loops by ten to thirty percent. Possibly because of the effectiveness of a simple application of loop unrolling, it has not been studied as extensively as other code improvements such as register allocation or common subexpression elimination. The result is that many compilers employ simplistic loop unrolling algorithms that miss many opportunities for improving the performance. This paper describes how aggressive loop unrolling is done in a retargetable optimizing compiler. Using a set of 32 benchmark programs, the effectiveness of this more aggressive approach to loop unrolling is evaluated. The results show that aggressive loop unrolling can yield performance improvements of 20 to 30 percent over the simple, naive approaches employed by many production compilers.
منابع مشابه
Using the Meeting Graph Framework to Minimise Kernel Loop Unrolling for Scheduled Loops
This paper improves our previous research effort [1] by providing an efficient method for kernel loop unrolling minimisation in the case of already scheduled loops, where circular lifetime intervals are known. When loops are software pipelined, the number of values simultaneously alive becomes exactly known giving better opportunities for kernel loop unrolling. Furthermore, fixing circular life...
متن کاملA New Vectorization Technique for Expression Templates in C++
Vector operations play an important role in high performance computing and are typically provided by highly optimized libraries that implement the Basic Linear Algebra Subprograms (BLAS) interface. In C++ templates and operator overloading allow the implementation of these vector operations as expression templates which construct custom loops at compile time and providing a more abstract interf...
متن کاملA comparative evaluation of software techniques to hide memory latency
Software oriented techniques to hide memory latency in superscalar and superpipe2ined machines include loop unrolling, software pipelining, and software cache prefetching. Issuing the data fetch request prior to actual need for data allows overlap of accessing with useful computations. Loop unrolling and software pipelining do not necessitate microarchitecture or instruction set architecture ch...
متن کاملRclp: a Novel Approach for Resource-constrained Loop Pipelining Rclp:a Novel Approach for Resource-constrained Loop Pipelining 3
In this paper a novel technique for resource-constrained loop pipelining is presented. RCLP is based on several dependence graph operations: loop unrolling, operation retiming, resource-constrained scheduling, and span reduction. All these operations are focused to nd a minimum length schedule able to be executed with a limited number of resources and thus maximizing resource utilization. Exper...
متن کاملRegister Optimization for Maximum Throughput Loop Pipelining Register Optimization for Maximum Throughput Loop Pipelining
UNRET (unrolling and retiming) is an approach for resource-constrained loop pipelining that aims at nding a loop schedule with maximum throughput and minimum register pressure. This paper proposes an algorithm in two phases. In the rst phase, a schedule with maximum throughput is found for a given set of resource constraints. To do this, diierent unrolling degrees are explored in decreasing ord...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1995